import React, { Component } from 'react';
import {  Flex, WingBlank,WhiteSpace,Icon } from 'antd-mobile';
import { Link, routerRedux } from 'dva/router';
import { connect } from 'dva';
import { necessaryTools } from './necessaryTools.less';
import myActivity from "../../assets/svg/myActivity.svg";
import group from "../../assets/svg/pintuan.svg";
import yushou from "../../assets/svg/yushou.svg";
import kanjia from "../../assets/svg/kanjia.svg";
import zhongchou from "../../assets/svg/zhongchou.svg";


class MyActivity extends Component {


    render() {
        const { data } = this.props;
        return (
            <div className={necessaryTools}>
                <WingBlank>
                    <WhiteSpace size="sm"/>
                    <Flex justify="between" style={{borderBottom:"1px solid #e5e5e5",padding:".2rem 0"}}>
                        <Flex>
                            <Icon className="tools_logo" type={myActivity.id}/>
                            <div>我的活动</div>
                        </Flex>
                        {/*<Flex>*/}
                        {/*<div className="all_tools">查看全部</div>*/}
                        {/*<Icon type={rightsvg.id} style={{width:".3rem",height:".3rem",marginLeft:".05rem"}}/>*/}
                        {/*</Flex>*/}
                    </Flex>
                    <Flex justify="around" className="tools">
                        <div onClick={()=>{
                                this.props.dispatch(routerRedux.push({
                                    pathname:`/groupOrder`
                                }))
                        }}>
                            <Flex justify="center">
                                <Icon className="fapiao" type={group.id}/>
                            </Flex>
                            <div style={{textAlign:"center"}}>拼团</div>
                        </div>
                        <div onClick={()=>{

                        }}>
                            <Flex justify="center">
                                <Icon className="fapiao" type={yushou.id}/>
                            </Flex>
                            <div style={{textAlign:"center"}}>预售</div>
                        </div>
                        <div onClick={()=>{

                        }}>
                            <Flex justify="center">
                                <Icon className="fapiao" type={kanjia.id}/>
                            </Flex>
                            <div style={{textAlign:"center"}}>砍价</div>
                        </div>
                        <div onClick={()=>{

                        }}>
                            <Flex justify="center">
                                <Icon className="fapiao" type={zhongchou.id}/>
                            </Flex>
                            <div style={{textAlign:"center"}}>众筹</div>
                        </div>
                    </Flex>

                    <WhiteSpace size="sm"/>
                </WingBlank>
            </div>
        );
    }
}


export default MyActivity;
